<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        th,
        td {
            width: 120px;
            height: 30px;
            border: 1px solid #000;
        }
    </style>
</head>

<body>
    <div class="box">
        <input type="text" placeholder="请输入账户名"><br>
        <input type="password" placeholder="请输入密码"><br>
        <button>发布</button>
    </div>

    <table>
        <thead>
            <tr>
                <th>账户名</th>
                <th>密码</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>

        </tbody>
    </table>
</body>

</html>

<script>
    var button=document.querySelector('button');
    var inp=document.querySelector('input');
    var tr=document.querySelector('tr');
    button.onclick=function(){
        inp.value=tr.children;
        tr.appendChild(inp);
    }







</script>